import request from "@/utils/request";
import { getTeamInfo } from "@/types/zxy/teamType";
import { getLabelType } from "@/types/zxy/labelType";
const team = {
  // 查询select框的所有option数据所有的机构表数据
  getAllChcsOrgan: () => {
    return request.post("/api/getAllChcsOrgan");
  },
  // 查询所有的团队
  getAllTeamApi: (data: getTeamInfo) => {
    return request.post("/api/getTeamBySearchPage", data);
  },
  // 查询新增团队下面团队标签
  getTeamLabel: (data: getLabelType) => {
    return request.post("/api/getLabelBySearchPage", data);
  },
  // 新增团队的接口
  AddTeamApi: (data: any) => {
    return request.post("/api/saveTeam", data);
  },
  // 根据机构id获取团队信息
  getTeamIdFromOrganApi: (data: object) => {
    return request.post("/api/getTeamByOrganId", data);
  },
  // 根据团队id查询医生信息
  getDoctorInfoByTeamId: (data: object) => {
    return request.post("/api/getDoctorBasicByTeamId", data);
  },
  // 根据团队ID查找服务包和标签信息
  getTeamLabelApi: (data: object) => {
    return request.post("/api/getServiceBasicByTeamId", data);
  }, //更新团队启用状态
  changeTeamAtatusApi: (data: any) => {
    return request.post("/api/updateFlagById", data);
  },
  // 根据团队id解散团队
  delTeamByTeamidApi: (data: any) => {
    return request.post("/api/dissolveTeamById", data);
  },
  // 加入团队的接口
  joinToTeamApi: (data: any) => {
    return request.post("/api/joinTeam", data);
  },
  // 根据医生详情id模糊查询未加入的团队信息以及对应机构信息
  findTeamNotIn: (data: any) => {
    return request.post("/api/getSearchNotJoinTeamIdByDoctorId", data);
  },
  // 根据医生id查找医生账号详情
  getDoctorInfoApi: (data: any) => {
    return request.post("/api/getDoctorById", data);
  },
  // 根据医生id查找医生详情
  getDoctorDetailApi: (data: any) => {
    return request.post("/api/getDoctorDetailById", data);
  },
  // 根据团队id查找医生名字和id
  getDoctorBasicInfo: (data: any) => {
    return request.post("/api/getBasicDoctorByTeamId", data);
  },
  //根据id修改团队信息
  modifyTeamInfoApi: (data: any) => {
    return request.post("/api/updateTeamById", data);
  },
  // 根据团队id查找所有的标签
  getAlllabelByTeamId: (data: any) => {
    return request.post("/api/getTeamOrganLabelByTeamId", data);
  },
};
export default team;
